package ch.idsia.ai.agents.controllers.myai.tests;

import ch.idsia.ai.agents.controllers.myai.Enemy;
import org.junit.*;

import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

/**
 * Created by IntelliJ IDEA.
 * User: Blake
 * Date: Jul 1, 2010
 * Time: 8:13:24 PM
 * To change this template use File | Settings | File Templates.
 */
public class EnemyTest
{
    @Test   public void testEnemy()
    {
        for (int i = 0; i < 100; ++i)
        {
            int random = (int)(Math.random()*100);
            Enemy test = new Enemy(0, 1, 1, 2, random);
            assertNotNull(test);
            assertTrue("testEnemy", test.getClass().getName().equals("ch.idsia.ai.agents.controllers.myai.Enemy"));
        }
    }
    
    @Test   public void testGetType()
    {
        int kind = (int)Math.floor((Math.random()*256));
        Enemy test = new Enemy(0, 0, 0, 0, kind);

        assertTrue(test.getType() == kind);
    }
}
